import request from "@/utils/request"

// 数据列表
export function list(params: any) {
    return request({
        method: "get",
        url: "/tienchin/business/list",
        params
    })
}

// 渠道来源
export function channel(params: any) {
    return request({
        method: "get",
        url: "/tienchin/business/channels",
        params
    })
}
// 活动信息
export function activity(id: number) {
    return request({
        url: "/tienchin/clue/activity/" + id,
        method: "get",
    })
}
// 活动状态

// 树形控件
export function treeselect() {
    return request({
        method: "get",
        url: "/system/dept/treeselect"
    })
}
// 分配给
export function assignData() {
    return request({
        method: "get",
        url: "/tienchin/clue/users/100"
    })
}
// 点击分配对话框的确定按钮
export function assignment() {
    return request({
        method: "post",
        url: "/tienchin/assignment"
    })
}

// 修改详情
export function detail(id: number) {
    return request({
        method: "get",
        url: "/tienchin/business/summary/"+id,
    })
}

// 修改后
export function updata(data: any) {
    return request({
        method: "put",
        url: "/tienchin/business",
        data
    })
}

// 删除
export function delData(id: number) {
    return request({
        method: "delete",
        url: "/tienchin/business/"+id,
    })
}

// 跟进
// export function followData(id: number) {
//     return request({
//         method: "get",
//         url: "/tienchin/follow/record/business/"+id,
//     })
// }
// 跟进
export function followData(id: any) {
    return request({
        method: "get",
        url: "/tienchin/business/"+id,
        data: id
    })
}

// 跟进记录
export function followRecod(id: number) {
    return request({
        method: "get",
        url: "/tienchin/follow/record/business/"+id,
        data: id
    })
}

// 点击保存后的跟进
export function saveFollow(data: any) {
    return request({
        method: "post",
        url: "/tienchin/business/follow",
        data
    })
}

// 职业
export function occupationData(params: any) {
    return request({
        method: "get",
        url: "/system/dict/data/type/business_occupation",
        params
    })
}

// 学历
export function educationData(params: any) {
    return request({
        method: "get",
        url: "/system/dict/data/type/business_education",
        params
    })
}

// 所在地区
// export function educationData(params: any) {
//     return request({
//         method: "get",
//         url: "/system/dict/data/type/business_education",
//         params
//     })
// }


// 性别
export function sexData(params: any) {
    return request({
        method: "get",
        url: "/system/dict/data/type/sys_user_sex",
        params
    })
}

// 意向类型
export function typeData(params: any) {
    return request({
        method: "get",
        url: "/system/dict/data/type/course_type",
        params
    })
}

// 意向课程
export function courseData(params: any) {
    return request({
        method: "get",
        url: "/tienchin/business/all_course",
        params
    })
}

// 跟进状态
export function statusData(params: any) {
    return request({
        method: "get",
        url: "/system/dict/data/type/business_status",
        params
    })
}

// 沟通重点
export function focusData(params: any) {
    return request({
        method: "get",
        url: "/system/dict/data/type/business_focus",
        params
    })
}